package ch.sfug.lang {
	import flash.utils.Dictionary;
	
	import ch.sfug.lang.LanguageTranslation;	

	/**
	 * @author loop
	 */
	public class LanguageTranslationObject implements LanguageTranslation {

		private var dic:Dictionary;

		public function LanguageTranslationObject( dictionary:Dictionary ) {
			dic = dictionary;
		}

		
		public function get(key:String):String {
			var value:String = dic[ key ];
			if( value != null ) {
				return dic[ key ];
			} else {
				throw new Error("there is no value defined in translation dictionary with key: " + key);
			}
		}
	}
}
